// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_CUSTOMER_ACCOUNT_ITEM
// * CreateDate    : 2012/11/1 9:41:50
// * Creater       : FinCustomerAccountItemEntity
// * LastChangeDate: 2012/11/1 9:41:50
// * LastChanger   : 2012/11/1 9:41:50
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class FinCustomerAccountItemEntity : EntityBase
    {
        public FinCustomerAccountItemTable TableSchema
        {
            get
            {
                return FinCustomerAccountItemTable.Current;
            }
        }

        public FinCustomerAccountItemEntity()
        {

        }

        public FinCustomerAccountItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CustomerAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ITEM_ID"]));
            this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
            this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
            this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
            this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
            this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
            this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
            this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
            this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
            this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
            this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
            this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
            this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
        }

        public FinCustomerAccountItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.CustomerAccountItemId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ACCOUNT_ITEM_ID"]));
            this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
            this.AmountDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["AMOUNT_DATE"]));
            this.AmountPerson = Convert.ToString(CommonFunctions.ToObject(dr["AMOUNT_PERSON"]));
            this.SalesOrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_ORDER_AMOUNT"]));
            this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
            this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
            this.ReceivableAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVABLE_AMOUNT"]));
            this.DeliveryAmountNoBilling = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_NO_BILLING"]));
            this.DeliveryAmountBilled = Convert.ToDecimal(CommonFunctions.ToObject(dr["DELIVERY_AMOUNT_BILLED"]));
            this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
            this.RelatedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_ID"]));
            this.RelatedOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER_CODE"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinCustomerAccountItemTable.Current;
            }
        }

        #region Perporty List
        public string CustomerAccountItemId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_CUSTOMER_ACCOUNT_ITEM_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_CUSTOMER_ACCOUNT_ITEM_ID, value); }
        }

        public string CustomerId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_CUSTOMER_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_CUSTOMER_ID, value); }
        }

        public DateTime AmountDate
        {
            get { return Convert.ToDateTime(GetData(FinCustomerAccountItemTable.C_AMOUNT_DATE)); }
            set { SetData(FinCustomerAccountItemTable.C_AMOUNT_DATE, value); }
        }

        public string AmountPerson
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_AMOUNT_PERSON)); }
            set { SetData(FinCustomerAccountItemTable.C_AMOUNT_PERSON, value); }
        }

        public decimal SalesOrderAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_SALES_ORDER_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_SALES_ORDER_AMOUNT, value); }
        }

        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_BILLING_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_BILLING_AMOUNT, value); }
        }

        public decimal ReceivedAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_RECEIVED_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_RECEIVED_AMOUNT, value); }
        }

        public decimal ReceivableAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_RECEIVABLE_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_RECEIVABLE_AMOUNT, value); }
        }

        public decimal DeliveryAmountNoBilling
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_NO_BILLING)); }
            set { SetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_NO_BILLING, value); }
        }

        public decimal DeliveryAmountBilled
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_BILLED)); }
            set { SetData(FinCustomerAccountItemTable.C_DELIVERY_AMOUNT_BILLED, value); }
        }

        public decimal SalesAmount
        {
            get { return Convert.ToDecimal(GetData(FinCustomerAccountItemTable.C_SALES_AMOUNT)); }
            set { SetData(FinCustomerAccountItemTable.C_SALES_AMOUNT, value); }
        }

        public string RelatedOrderId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_RELATED_ORDER_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_RELATED_ORDER_ID, value); }
        }

        public string RelatedOrderCode
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_RELATED_ORDER_CODE)); }
            set { SetData(FinCustomerAccountItemTable.C_RELATED_ORDER_CODE, value); }
        }

        public string ApplicationId
        {
            get { return Convert.ToString(GetData(FinCustomerAccountItemTable.C_APPLICATION_ID)); }
            set { SetData(FinCustomerAccountItemTable.C_APPLICATION_ID, value); }
        }

        #endregion
    }


}

